﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Data;

namespace ReferenceTemplate.Windows8.Converter
{
    public class ParallaxConverter : IValueConverter
    {
        private const double Factor = -0.1;

        public object Convert(object value, Type targetType, object parameter, string language)
        {
            double offet = 0;

            if(value is double)
            {
                offet = (double)value * Factor;
            }

            return offet;
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }
}
